/*
 *    Copyright (c) 2018-2025, proj All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the proj developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: proj
 */

package com.ykht.proj.coupon.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ykht.proj.common.core.util.R;
import com.ykht.proj.coupon.entity.CnBrand;
import com.ykht.proj.coupon.entity.CnCoupon;
import com.ykht.proj.coupon.vo.*;
import com.ykht.proj.coupon.vo.CnBrandVo;
import com.ykht.proj.coupon.vo.CnCarePageResp;
import com.ykht.proj.coupon.vo.CnCouponDetailResp;
import com.ykht.proj.coupon.vo.PinPaiGuanVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 品牌表
 *
 * @author proj code generator
 * @date 2020-11-16 17:00:21
 */
public interface CnBrandService extends IService<CnBrand> {

	R insertBrand(CnBrandVo cnBrandVo) throws Exception;

	R updateBrand(CnBrandVo cnBrandVo) throws Exception;

	R queryPage(Page page, CnBrandVo cnBrandVo);

//	String uploadFile(MultipartFile file);

	PinPaiGuanVo pinPaiGuan(Long o);

	PinPaiGuanVo pinPaiGuanPinPai(Long brandId);

	Map uploadFile(MultipartFile file);


	IPage<PinPaiGuanVo> opPage(Page page, CnBrand cnBrand);

	/**
	 * 品牌馆详情
	 *
	 * @param req
	 * @return
	 */
	PpgDetailResp ppgDetail(PpgDetailReq req);

	List<CnCouponVo> findCouponByShopId(Long brandId, String couponName);

	Long queryByUserId(Long userId);

	/**
	 * 品牌上下架
	 *
	 * @param cnBrandVo 品牌表
	 * @return
	 */
	R updateByDisplay(CnBrandVo cnBrandVo) throws Exception;

	List<CnBrandLabel> brandAndLabelByIds(List toList);

	/**
	 * S-01首页（品牌）分页查询
	 * @param page       分页
	 * @param homePageSearch   条件
	 * @return
	 */
    IPage<CnBrandVo> getCmsBrandPage(Page page, HomePageSearch homePageSearch);
}
